package com.hong.qrpc.example.annotation;

import com.alibaba.nacos.api.exception.NacosException;
import com.hong.RpcServer;

import java.io.IOException;

/**
 * @Author HQT
 * @Date 2022/7/25 11:05
 */
public class Server1 {
    public static void main(String[] args) throws NacosException, IOException {
        RpcServer rpcServer = new RpcServer("application.server1.properties");

//        String serverIp = "192.168.80.128";
//        int serverPort = 8801;
//        String serverAddr = serverIp + ":" + serverPort;
//        String serviceName = "nacos-sdk-java-provider";
//        InetAddress addr = InetAddress.getLocalHost();
//        NamingService namingService = NamingFactory.createNamingService(serverAddr);
//        namingService.registerInstance(serviceName, addr.getHostAddress(), 3000);

        rpcServer.start();
    }
}
